package com.home.rest;

import com.home.base.msg.ObjectRestResponse;
import com.home.mq.MqProducer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/mq")
public class MqController {
    @Resource
    MqProducer producer;
    @GetMapping("get")
    public ObjectRestResponse getInfo(){

        return  ObjectRestResponse.success("查询成功").result(producer.sendMessage("test","222"));
    }
}
